home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 21 / AACD 21.iso / AACD / Utilities / Ghostscript / src / bfont.h < prev    next >
Encoding:
C/C++ Source or Header  |  2001-01-01  |  3.3 KB  |  85 lines

  1. /* Copyright (C) 1992, 1995, 1996, 1998, 1999 Aladdin Enterprises.  All rights reserved.
  2.   
  3.   This file is part of AFPL Ghostscript.
  4.   
  5.   AFPL Ghostscript is distributed with NO WARRANTY OF ANY KIND.  No author or
  6.   distributor accepts any responsibility for the consequences of using it, or
  7.   for whether it serves any particular purpose or works at all, unless he or
  8.   she says so in writing.  Refer to the Aladdin Free Public License (the
  9.   "License") for full details.
  10.   
  11.   Every copy of AFPL Ghostscript must include a copy of the License, normally
  12.   in a plain ASCII text file named PUBLIC.  The License grants you the right
  13.   to copy, modify and redistribute AFPL Ghostscript, but only under certain
  14.   conditions described in the License.  Among other things, the License
  15.   requires that the copyright notice and this notice be preserved on all
  16.   copies.
  17. */
  18.  
  19. /*$Id: bfont.h,v 1.3 2000/09/19 19:00:09 lpd Exp $ */
  20. /* Interpreter internal routines and data needed for building fonts */
  21. /* Requires gxfont.h */
  22.  
  23. #ifndef bfont_INCLUDED
  24. #  define bfont_INCLUDED
  25.  
  26. #include "ifont.h"
  27.  
  28. /* In zfont.c */
  29. int add_FID(P4(i_ctx_t *i_ctx_p, ref *pfdict, gs_font *pfont,
  30.            gs_ref_memory_t *imem));
  31.  
  32. font_proc_make_font(zdefault_make_font);
  33. font_proc_make_font(zbase_make_font);
  34. /* The global font directory */
  35. extern gs_font_dir *ifont_dir;
  36.  
  37. /* Structure for passing BuildChar and BuildGlyph procedures. */
  38. typedef struct build_proc_refs_s {
  39.     ref BuildChar;
  40.     ref BuildGlyph;
  41. } build_proc_refs;
  42.  
  43. /* Options for collecting parameters from a font dictionary. */
  44. /* The comment indicates where the option is tested. */
  45. typedef enum {
  46.     bf_options_none = 0,
  47.     bf_Encoding_optional = 1,    /* build_gs_font */
  48.     bf_FontBBox_required = 2,    /* build_gs_simple_font */
  49.     bf_UniqueID_ignored = 4,    /* build_gs_simple_font */
  50.     bf_CharStrings_optional = 8,    /* build_gs_primitive_font */
  51.     bf_notdef_required = 16    /* build_gs_primitive_font */
  52. } build_font_options_t;
  53.  
  54. /* In zbfont.c */
  55. int build_proc_name_refs(P3(build_proc_refs * pbuild,
  56.                 const char *bcstr,
  57.                 const char *bgstr));
  58. int build_gs_font_procs(P2(os_ptr, build_proc_refs *));
  59. #define BUILD_BASE_FONT_PROC(proc)\
  60.   int proc(P7(i_ctx_t *, os_ptr, gs_font_base **, font_type,\
  61.           gs_memory_type_ptr_t, const build_proc_refs *,\
  62.           build_font_options_t))
  63. typedef BUILD_BASE_FONT_PROC((*build_base_font_proc_t));
  64. BUILD_BASE_FONT_PROC(build_gs_primitive_font);
  65. int build_gs_FDArray_font(P6(i_ctx_t *, /*const*/ ref *, gs_font_base **,
  66.                  font_type, gs_memory_type_ptr_t,
  67.                  const build_proc_refs *));
  68. int build_gs_outline_font(P8(i_ctx_t *, os_ptr, gs_font_base **, font_type,
  69.                  gs_memory_type_ptr_t, const build_proc_refs *,
  70.                  build_font_options_t, build_base_font_proc_t));
  71. BUILD_BASE_FONT_PROC(build_gs_simple_font);
  72. void init_gs_simple_font(P3(gs_font_base *pfont, const double bbox[4],
  73.                 const gs_uid *puid));
  74. void lookup_gs_simple_font_encoding(P1(gs_font_base *));
  75. int build_gs_font(P7(i_ctx_t *, os_ptr, gs_font **, font_type,
  76.              gs_memory_type_ptr_t, const build_proc_refs *,
  77.              build_font_options_t));
  78. int build_gs_sub_font(P8(i_ctx_t *, const ref *, gs_font **,
  79.              font_type, gs_memory_type_ptr_t,
  80.              const build_proc_refs *, const ref *, ref *));
  81. int define_gs_font(P1(gs_font *));
  82. gs_glyph zfont_encode_char(P3(gs_font *pfont, gs_char chr, gs_glyph_space_t ignored));
  83.  
  84. #endif /* bfont_INCLUDED */
  85.